package com.demo2do.boyle.backend.service.advertisement;

import java.util.List;

import com.demo2do.boyle.common.entity.task.Task;
import com.demo2do.boyle.common.entity.task.TaskStatus;
import com.demo2do.core.persistence.support.Filter;
import com.demo2do.core.service.GenericService;
import com.demo2do.core.web.resolver.Page;

/**
 * @author leo
 */
public interface TaskService extends GenericService<Task> {

	/**
	 * @return the Task count
	 */
	public int count();

	/**
	 * 
	 * @param taskStatus
	 * @return the task count
	 */
	public int count(TaskStatus taskStatus);

	/**
	 * 
	 * @param filter
	 * @return the filter list count
	 */
	public int count(Filter filter);

	/**
	 * 
	 * @param page
	 * @return the task list
	 */
	public List<Task> list(Page page);

	/**
	 * 
	 * @param page
	 * @param taskStatus
	 * @return the auditing task list
	 */
	public List<Task> list(TaskStatus taskStatus, Page page);
	
	/**
	 * audit task 
	 * 
	 * @param task
	 */
	public void auditPass(Task task);
	
	/**
	 * audit task 
	 * 
	 * @param task
	 */
	public void auditUnpass(Task task);
	
	/**
	 * audit task 
	 * @param advertisement 
	 *//*
	public int countFinishedNum(Advertisement advertisement);*/
	
	/**
	 * audit task 
	 * 
	 * @param task
	 */
	public void updateOtherStatus(Task task);
	

}
